home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
LADDERS.ZIP
/
MAKES.DOC
< prev
next >
Wrap
Text File
|
1995-05-31
|
24KB
|
411 lines
MAKES - utility
───────────────
The design of sprites, background pictures and tiles is much to tedious to be
carried out manually. For this reason, there are two utility programs to
simplify that task. The first one is a resident program named "GRAB" to
capture graphics from other applications and convert them into sprites, the
second is MAKES, a spritemaker program.
To use it, you must have a mouse installed and a Super-VGA card.
-> MAKES uses a "tweaked" 640x400x256 graphic mode, only available at Super-
VGA-cards! If you don't have one (or one which chip-set isn't supported by
the supplied BGI-driver), you won't be able to run MAKES!
Let me cite from Jordan Hargrave's docs:
>Card types supported: (SuperVGA drivers)
>Ahead, ATI, Chips & Tech, Everex, Genoa, Paradise, Oak, Trident (both 8800
>and 8900), Tseng (both 3000 and 4000 chipsets) and Video7.
>These drivers will also work on video cards with VESA capability.
>
>I have not tested these drivers on all these card types, so I can not
>guarantee perfect operation with your card. I have tested them extensively
>on Trident, Tseng and ATI cards, and have had no problems. (Trident 8800
>cards occasionally have problems, especially older models)
If you can't run MAKES, then please drop me a note specifying which brand of
VGA card you have and which chip-set it uses!
There are normally no parameters or such things, just start it!
(However, if you _do_ have a SVGA and MAKES does not show its graphic screen
properly, then use the syntax "MAKES /480" to invoke the program in
640x480x256 graphic mode instead)
The screen is divided in several areas:
- the so-called "work area" in the upper left region, in which you paint your
sprite
- the palette area to the right of it, where you choose colors for painting
or define new colors
- the info bar right beneath the work area, which informs you about the
cursor position and some other actually set data
- the icon field, supplying 18 different functions: 8 "tools" and 10 pure
functions
- 10 function boxes at the very screen bottom, which can also be accessed by
pressing the appropriate function key (ever seen the Norton Commander?)
(Note that a lot of the icons/function boxes have two functions, where the
second one can be reached by holding down the shift-key while pressing/
clicking at the icon - this will be described later on, but you can always
press F1 in MAKES for a short summary.)
Now let's take a small tout through MAKES!
-> I propose that you print out this part of the documentation and then start
MAKES.EXE for the following description!!!
Huh - where to begin? Okay, look at the work area's boundary: it has small
marks on it, indicating 8 pixel intervals. Move the mouse cursor somewhere into
the workarea: right beneath the work area, your PC will display the mouse
cursor's position and what color is currently set at that point. Now move around
and convince yourself about the marks' values. Press the left mouse button a
few times: each time, a white pixel will be drawn at the cursor position,
because "pixel" is the selected tool and "white" the actually set drawing color.
Nothing whopping, eh? - Now press "+" a few times: wow! You zoom into the work
area as much as you wish (well, I limited it to a factor 30, but if _that_ is
not enough you should consider selling your PC for a seeing-eye dog, anyway!).
Use "-" to zoom out, down to value 1: for easier pointing, the cursor will
change to a small crosshair pointer when zooming is at factor 1.
-> Note that as the screen you look at has resolution 640x400, while AniVGA's
has 320x200, zoom=2 (the default value) will give you normal 1:1 aspect
ratio!
You don't like monochrome pictures? Ok, then click (with the left mouse button)
at another color in the palette area: this changes the drawing color to the
color you clicked at.
Repeat choosing a color, but this time press the _right_ mouse button: a menu
will pop up and let you change the RGB-values of that color; this way, you may
alter the palette for your sprites!
-> Note that RGB-values reach from 0 to 63. If you want to copy another color's
values, then just click at this color; e.g. if you want to have color 222
hold the same color as 111 (for example as a template), then click with the
_right_ button at color 222 and then with the _left_ button at color 111
Now choose another drawing tool, let's say lines: click at this icon and move
back into the work area. Choose a starting point and click at it (release the
mouse button!): now you started a line: move around the mouse to route your
line; if you are content with it, then press the left button again. If you
decide to cancel the line drawing instead, then press the right button instead.
-> This "philosophy" will be used for all tools: press the left button to
start/advance/complete an action, press the right button any time to cancel
what you are doing - so get used to it!
Now repeat the process of drawing a line, but hold down "shift" while you are
clicking at the starting point: this tells the object "to be aligned" which
in the context of lines means that you are drawing a horizontal, vertical or
diagonal line! In the same way, you can align rectangles to become squares and
ellipses to circles. Try it! Choose these icons and draw the according objects,
aligned and not aligned (if you choose the lower rectangle/ellipse icon, your
objects will be filled out with the actual drawing color).
-> You may select another color even if you are in midst of drawing an object;
move out of the work area, click at the color you wish - as soon as you
move back into the work area, your object will change!
Let's try the filling tool (the left, bottommost one): it will fill all points
it can reach from the pixel you clicked at having the same color, e.g. if you
click at a white pixel, it will color all white pixels neighboured to that
pixel and so on. Note that as long as you don't press the left button a second
time, this coloring doesn't rest, that is if you move around the mouse after
having clicked the first time, MAKES will restart its fill algorithm starting
at the new pixel your mouse points at! This behaviour is a bit confusing in
the beginning but comes in very handy when you get used to it.
-> If you really get stuck - especially on slow machines - then just press the
right mouse button for two or three seconds to cancel the action and start
over again.
The last tool to be mentioned is the copy tool (the icon with the scissors):
you can span a (dotted) rectangular area which you want to copy the same way
you would draw a rectangle, but after pressing the mouse button a second time,
a copy of this area will be visible at your cursor which you can place where-
ever you want to. (Note that color 0 inside this copy will be treated as trans-
parent, which makes it easier to overlay objects at the screen!)
These 8 icons (the 4 leftmost in the upper and lower row) make up the available
_tools_, the resting 10 icons are "function buttons", that is: their linked
action will take place at once (respectively: after asking you necessary para-
meters).
I'll first name them, starting in the upper row at the 5th icon, in clockwise
order:
a) change color
b) rotate work area left
c) rotate work area right
d) mirror work area horizontally
e) go/move to the upper-left
f) display boundaries
g) mirror work area vertically
h) rotate work area down
i) rotate work area up
j) blink color
a)
You can replace pixels of a specific color by another color with this tool:
the program will ask you for the colors, which you can select by either
clicking in the palette area or by clicking at pixels in the work area itself.
b), c), h), i)
Clicking at one of these buttons will move the contents of the work area in
the according direction, but what "falls out" at one side of the work area
will show up on the opposite side again. If you hold down "shift" while
clicking, the image will rotate by one pixel, without shift, it will rotate
by 1/4 of the actual screen width.
d), g)
I guess these two mirror options should be quite clear; note that as
they mirror a small image in the upper left corner to the "far away" right/
bottom region of the work area, you'll often need a tool to "pull back" the
graphic contents to the upper left corner: that is exactly the task of the
e) icon: it will move the graphic contents to the top and left as much as
possible.
e)
As mentioned above, this tool will move the work area contents to the left
(and top), until column 0 (row 0) holds a non-zero colored pixel.
If you hold down "shift" while clicking at this icon, there is another
functionality: then, MAKES scrolls back the visible part of the workarea
back to the upper left region of the picture (0,0), that is: this is a short-
cut for pressing the left- and up-arrow keys a few times (see below for more
about this).
f)
If you want to know/see the boundaries of your sprite, then click at this
icon: the leftmost and rightmost (upmost & bottommost) pixel of each row
(column) will blink and a popup window will inform you about the sprite's
size numerically.
If you hold down "shift" while clicking this icon, MAKES will also blink all
transparent areas inside the sprite, which may be useful if you don't know
whether you must use display mode Display_SHADOW <-> Display_SHADOWEXACT and
Display_FAST <-> Display_NORMAL; in all other cases you can forget about this
option.
-> Note that sprites are always stored as the smallest rectangle which
surrounds them and starts at the upper left corner (0,0): if you don't have
special reasons to do otherwise, your sprites should start in the upper left
corner.
If for example you realize a sprite consisting of one single point at
coordinates (a,b), the smallest surrounding box with (0,0) as upper left
corner would be
(0,0) (a,0) of size (a+1)*(b+1) pixels (=bytes)!!!
┌──────────┐
│ │
│ │
│ │
└──────────▀ <─ this is your 1 point
(0,b) (a,b)
(In addition to that, the right edge of this box will be rounded up so that
the width of the sprite will be a multiple of 4)
To determine what areas belong to your sprite and which don't, the program
assumes color 0 to specify no-sprite-areas and all other colors to be part
of your sprite (roughly spoken).
j)
If for some reason you must know of all pixels of a specific color (e.g. to
distinguish two very similiar colors), you can use this function: the program
will ask you to select the color, what you can do by either clicking at a
work area pixel with that color or at a color in the palette area.
Okay, now that we are through with the icons, let's have a look at the keys:
you already know that "+" and "-" zoom in and out the workarea. But if zoom>1
then only a part of the complete workarea (320x200 pixels) will be visible!
To work on the "offscreen" regions, you can scroll the work area by using the
cursor keys: pressing one of the arrow keys will scroll by 1/4 screen into the
corresponding direction; if you hold down "shift" while pressing an arrow key,
it will scroll by one pixel instead. The absolute coordinate value of the
upper left corner you are looking at will be displayed by the two "offset:"
messages, e.g. "offset X: 40" means that there are 40 columns (0..39) to the
left of the visible window of the work area, which you may scroll in by
pressing the left arrow key. (Consider the work area as a view-finder of an
imaginary camera which you may slide into each direction).
A short-cut to return to the work area's origin (0,0) is available, too: press
shift and click at the "go/move to upper left" icon.
The function keys do what they tell you:
F1 = a short summary of the functionality not visible at first sight
F2 = save the work area's contents to disk as a sprite file
F3 = load a previously saved sprite into the work area; if you press "shift"
while activating this icon (or Shift-F3), then the work area won't be
erased before loading the sprite: this way, you may overlay several
sprites on the screen
F4 = save the actually set palette to disk. Note that if you are using the
BIOS' default palette, the program won't store it to disk (as you don't
need)
F5 = load a previously saved palette. This function is especially necessary
when you used GRAB to capture a sprite from an application using a
different palette. (See below for more about palette handling)
F6 = save the work area's contents to disk, this time as a background picture
F7 = load a previously saved background picture; the same notes apply as said
to loading sprites (F3)
F8 = clear screen. This will erase the work area and let you start all over
again. Note that it won't reset the palette to the BIOS' default! If you
want that, you have to press Shift-F9, too!
F9 = map the workarea colors onto another palette. This feature asks you for
a palette, loads that and then uses a minimum square algorithm to exchange
each's pixel color by the one from the specified palette which comes as
close as possible to the original color. (See below for more about that)
Shift-F9 works the same, but maps to the BIOS' default palette instead
of asking you for a palette file.
F10= quit the program
Note :
o Palettes:
Note that if you load/save a sprite or picture file, MAKES won't load/save
the according palette automatically, you have to do that manually. This has
been done intentionally, however: never forget that you may design a hundred
sprites with a hundred different palettes, but when it all comes down to
display these sprites simultaneously in your programs, only *one* palette may
be active! For that reason, you must mix all those palettes to the one you are
going to use.
Normally, that won't be that dramatic, as 240 free color shades (it is *very*
wise not to change the first 16 EGA-compatible colors) seem enough to me, but
perhaps you want to include a formerly designed sprite A, using palette B,
into a new program where you use palette C! Before you start mixing a new
palette D for this old and your new sprites together, you should try mapping
old sprite A's colors to palette C: To accomplish that, load sprite A (using
F3), then load its old palette B (using F5); now press "map palette to
palette" (F9) and tell the program to map onto palette C: if the result looks
good enough, then save sprite A (perhaps using a different name) and use
palette C for all items in your program, else you have to find a compromise
between palettes B and C (I'm actually working on a program which will auto-
matize that job, but for now, you are on your own!).
To state it clear: there is a conceptional difference between EXCHANGING a
color (using the "change color" icon) and CHANGING a color itself (by altering
the RGB values of one or multiple colors):
- exchanging colors doesn't change the palette, it merely uses another color
of that palette
- changing palette colors doesn't change the pixels' color number, but the
color's RGB value
In other words: if you exchange colors, then you don't have to save the color
palette again, as it didn't change, but the sprite, because its data changed.
On the other hand, if you changed palette colors, then you'll have to save the
palette, but not the sprite, as the pixel data didn't change.
(If you didn't get that: just always save both and forget about it...)
o Mouse problems:
I noticed that sometimes, the program hangs when initializing the mouse driver
(when it calls "INT 33h" with AX=0), what you see in that the starting count-
down doesn't get below 7. I don't have _any_ idea why this happens and hope
it won't show up on other systems. Note that this is (at least what I noticed)
a spurious error: cancel the program, restart it once more and it will work!
Besides that, when quitting the program, MAKES sometimes reports a senseless
runtime error - it is a spurious, not reproducable error I couldn't track
down, either (perhaps TP doesn't like my TSR / QEMM installation, I dunno)!?
o SVGA-compatibility problems:
The 640x400x256 mode seems to make problems on some SVGAs, especially ones
with Paradise chipsets. Therefore, a command line switch "/480" has been
added. If you use this switch, the program will start in 640x480x256 mode
instead. I've been reported that this mode works on almost all cards; the
only disadvantage is, that the aspect ratio differs from the 320:200 (resp.
640:400) mode. (Tip: use your monitor's vertical adjustment controller to
spread the image accordingly if this is a problem for you)
o Memory:
You should have at least 256K free RAM if you start MAKES, or it won't work.
o Sprite size:
If MAKES tells you that it can't save the workarea as a sprite, because it
is "to big" - well, then you'll have to shrink your sprite! Sorry, but I
wanted MAKES to handle CODs and PICs at the same time, but 320x200 pixels
(the size of a picture) is to much for a COD, as the additional data stored
along with the sprite would make it larger than 64K! (Cut off a few rows or
columns until it works.)
Note also that MAKES has to store sprites with widths being a multiple of 4!
That is: it doesn't matter, whether the max. used x-coordinate is for example
316, 317, 318 or 319, because for all those 4 widths (0..316=317 pixels,
0..317=318, 0..318=319, 0..319=320), MAKES would have to store them with
the "rounded up" width of 320 pixels!
(In other words: although AniVGA itself can handle sprites up to 32000 pixels
in each axis and 64K max. size, MAKES restricts you to sprites of x-size at
most 320 pixels and y-sizes of at most 200 pixels)
o COD <-> PIC:
Yes, you read right: MAKES doesn't care whether you are working on a sprite
or a picture graphic: just paint it and store it into the format you want
(subject to what I said above concerning the 64K limit)! Oh yes, that way
you may convert a sprite into a background picture (and vice versa) if you
have reason to do so!
o Tips:
The best way to design a sprite is to start in midst of a cleared work area.
If you need more room, rotate your sprite in the appropriate direction.
If you think you're done, use the rotate boxes again (or the "move to upper-
left" icon) to align your sprite with the upper left corner. Then click on
the "display boundaries" box to compare the sprite's size with what you
expected. To wide (high)? Then there is a pixel with color <> 0 to the right
(beneath) your sprite! Look at the max. column (row) MAKES told you and kill
that pixel! (To see it more clearly, just hold down "shift" while clicking
at the "display boundaries" icon).
If you are unsure whether you can use display mode Display_FAST or need
Display_NORMAL (same applies for Display_SHADOWEXACT and Display_SHADOW),
then hold down "shift", click at the "display boundaries" icon and look at
the picture: if the blinking parts "spread" out of the parts you think your
sprite should be made of, then you should use Display_NORMAL
(Display_SHADOWEXACT, respectively), if all the blinking areas are inside your
sprite, you can (and should) use Display_FAST (Display_SHADOW).
BFFFFFFF - utility
──────────────────
Ever had a flat tire? It makes "bffffffffff" as the air goes out and the tire
becomes smaller and smaller...
BFFFFFFF is a little compression utility which "lets the air out of your data
files". Unlike a flat tire, your data files remain functional, however: AniVGA
has been extended to use some disk reading routines which are "transparent" to
compressed FNT-, PIC-, PAL-, COD- and LIB-files in that it notes whether the
file to read in has been compressed with BFFFFFFF or not and acts accordingly.
You have to supply three command line parameters:
- the source file name,
- the destination file name (which must be different from the source)
- and if you want to (c)ompress or (d)ecompress your file.
For example...
BFFFFFFF mysprite.lib mysprite.new c
...would compress the file mysprite.lib to the file mysprite.new! You could
now delete the old mysprite.lib file and rename mysprite.new to mysprite.lib,
if you want.
If you want to create a compressed library, you have several possibilities:
a) First compress the COD-files and then concatenate them to the LIB-file
b) First concatenate the (uncompressed) COD-files and then compress this LIB
c) Concatenate some compressed and not compressed files together to form a
library (but you may *NOT* compress that library afterwards!!!)
d) Build two compressed libraries, using a),b) or c), and then concatenate
them to form a new library
In other words, you may concatenate and/or compress freely, as long as you
meet one requirement: no file may be compressed more than one time!
In especially, you may not compress a LIB-file in which one or more COD-files
have already been compressed beforehand!!!
The most effective way for compression is b): chain uncompressed COD-files to
build a library and then compress that library. If you are unsure whether one
or more of the files within that library have already been compressed in
before, then use UNLIB on the library (this will result in uncompressed CODs),
bundle these files again to form a library and then compress it.
Note : - Using compressed files is a trade off between speed and disk space:
compressed files take some time to decompress while loading, but pre-
serve disk space, uncompressed files load faster but occupy more disk
space.
- First, create your program with uncompressed data files. Then, decide
if it pays of to compress the files.
- All utility files with the exception of BFFFFFFF will produce uncom-
pressed data files; you'll have to use BFFFFFFF to compress them.
- As said, you may not "double compress" a file; however, BFFFFFFF can
care for that automatically with the exception of LIBs (see above)
- If you type in the command line to invoke BFFFFFFF, don't count the
"F"s, as MSDos will forgive you, if you type in more than necessary:
BFFFFFFFFFFFFFFFFFF foobar.cod foobar.new c will work, too!
- See "COMPRESS" below for more information about the compression
UNLIB - utility
───────────────
Sometimes, you will want to reverse the process of building a sprite library,
that is: you want to split a sprite library into the sprite files of which it
consists.
To do that, call UNLIB with the name of the sprite library to split. UNLIB
will then create the files UNLIB000.COD, UNLIB001.COD, UNLIB002.COD,... which
represent the sprite files wanted.
Note here that UNLIB cannot restore the original filenames you used (there is
no such entry in a sprite's header). For that, it is a good idea to write down
the names and sequence of the sprite files used in building a sprite library.
(If you didn't, you still can load every extracted sprite with MAKES, look at
it and give it the right name then)